<include file="Public/head" />
<!--<script src="{:get_style_cdnurl()}paimai/yunying/js/city.js"></script>-->
<style>
    #fail_type {
        -moz-appearance: none;
        background: rgba(0, 0, 0, 0) url("http://img1.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 130px 5px;
        border: 1px solid #d7d7d7;color: #666;float: left; height: 25px;line-height: 25px;margin-left: 24px;margin-right: 10px;text-align: center;width: 150px;}
    #searchFrom .sheng-text{height:26px;width:100px;background:url("http://img3.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 80px 7px;border:solid 1px #c5c5c5;margin-right:7px;}
    #searchFrom .area{margin:0;}
    #searchFrom #area{width:140px; background-position:120px 7px}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar" menu="jybggl.tcgl"/>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li onclick="change_search(1);get_list(1);" class="yuCurrent">待退车辆</li>
                <li onclick="change_search(2);get_list(2);">跟踪中</li>
                <li onclick="change_search(3);get_list(3);">已退车辆</li>
            </ul>
        </div>
        <div class="yuList" >
            <div class="yuSuo clearfix">
              <form id="searchFrom">
                  <input id="t" name="t" type="hidden" value="">
                  <div id="time">
                      <input type="text" id="start_time" name="start_time" class="completion_time_start" readonly placeholder="请选择开始时间" value="{$params.start_time}" >
                      <input type="text" id="end_time" name="end_time" class="completion_time_start" readonly placeholder="请选择结束时间" value="{$params.end_time}" >
                  </div>

                  <select name="bc_city" id="bc_city" class="tracking_list1">
                      <?php if ($is_hq): ?>
                      <option value="">请选择分公司</option>
                      <?php endif ?>
                      <?php foreach ($bc_list as $k => $v): ?>
                      <option value="{$k}"
                      <?php if (I('get.bc_city') == $k): ?>
                      selected="selected"
                      <?php endif ?>
                      >{$v}</option>
                      <?php endforeach ?>
                  </select>

                    <select name="type" id="type" class="tracking_list1">
                        <option value="0">请选择车辆类型</option>
                        <option value="1">违约车辆</option>
                        <option value="2">自收车辆</option>
                    </select>

                   <input type="text" id="sno" name="sno" placeholder="车辆编号" value="{$params.sno}" class="suoDian" />
                   <input type="text" id="car_plate_number" name="car_plate_number" placeholder="车牌号" value="{$params.car_plate_number}" class="suoDian" />
              </form>
                <input type="button" onclick="search();" id="search" value="搜索" class="suoSou">
            </div>
            <div class="listBox" id="listBox"></div>
        </div>
        <div class="clear"></div>
    </div>
</div>
</body>
<script type="text/javascript">
    get_list(1);
    function get_list(t) {
        change_search(t);
        $("#searchFrom input").val("");
        //$("#searchFrom select").val();
        $("#t").val(t);
        $.get("/RefundCar/getList", $("#searchFrom").serialize(), function (data) {
            $("#listBox").html(data);
        }, "html");
    }

    function change_search(status) {
        if(status == 3){
            $('#time').css("display","block");
        }else{
            $('#time').css("display","none");
        }
    }

    function get_page(p) {
        var data = $("#searchFrom").serialize() + "&" + encodeURI("p=" + p);
        $.get("/RefundCar/getList", data, function (data) {
            $("#listBox").html(data);
        }, "html");
    }

    function search() {
        $.get("/RefundCar/getList", $("#searchFrom").serialize(), function (data) {
            $("#listBox").html(data);
        }, "html");
    }

    $("#start_time").ymdateplugin({
        changeMonth: true,
        changeYear: true
    });

    $("#end_time").ymdateplugin({
        changeMonth: true,
        changeYear: true
    });

</script>
</html>
